// react2/rootComponent.js
import React from 'react';
import { BrowserRouter as Router, Route } from "react-router-dom";

export default class Root extends React.Component {
  constructor() {
    super();
  }

  render() {
    return (
            <Router>
                <Route path="/react2/page1" component={()=><span>1</span>}/>
                <Route path="/react2/page2" component={()=><span>2</span>}/>
                <Route path="/react2" exact component={()=><span style={{fontSize: '20px', position:'absolute', bottom: '55%', left: '45%'}}>我代表的是react2这个应用程序哟</span>}/>
            </Router>    
    );
  }
}